package com.ktgj.flight.mapper;

import java.util.List;

import com.ktgj.flight.domain.FlightOrderInfoTickets;
import com.ktgj.flight.vo.FlightOrderInfoVo;
import org.apache.ibatis.annotations.Param;

/**
 * 机票预订_机票订单机票明细Mapper接口
 * 
 * @author ruoyi
 * @date 2021-10-26
 */
public interface FlightOrderInfoTicketsMapper 
{
    /**
     * 查询机票预订_机票订单机票明细
     * 
     * @param orderInfoTicketsId 机票预订_机票订单机票明细ID
     * @return 机票预订_机票订单机票明细
     */
    public FlightOrderInfoTickets selectFlightOrderInfoTicketsById(Long orderInfoTicketsId);

    /**
     * 查询机票预订_机票订单机票明细
     *
     * @param orderId 机票预订_机票订单机票明细ID
     * @return 机票预订_机票订单机票明细
     */
    public List<FlightOrderInfoTickets> selectFlightOrderInfoTicketsByOrderId(Long orderId);

    /**
     * 查询机票预订_机票订单机票明细列表
     * 
     * @param flightOrderInfoTickets 机票预订_机票订单机票明细
     * @return 机票预订_机票订单机票明细集合
     */
    public List<FlightOrderInfoTickets> selectFlightOrderInfoTicketsList(FlightOrderInfoTickets flightOrderInfoTickets);

    /**
     * 新增机票预订_机票订单机票明细
     * 
     * @param flightOrderInfoTickets 机票预订_机票订单机票明细
     * @return 结果
     */
    public int insertFlightOrderInfoTickets(FlightOrderInfoTickets flightOrderInfoTickets);

    /**
     * 修改机票预订_机票订单机票明细
     * 
     * @param flightOrderInfoTickets 机票预订_机票订单机票明细
     * @return 结果
     */
    public int updateFlightOrderInfoTickets(FlightOrderInfoTickets flightOrderInfoTickets);

    /**
     * 修改票号
     *
     * @param flightOrderInfoTickets 机票预订_机票订单机票明细
     * @return 结果
     */
    public int updateFlightOrderInfoTicketsByTicketNo(FlightOrderInfoTickets flightOrderInfoTickets);

    /**
     * 删除机票预订_机票订单机票明细
     * 
     * @param orderInfoTicketsId 机票预订_机票订单机票明细ID
     * @return 结果
     */
    public int deleteFlightOrderInfoTicketsById(Long orderInfoTicketsId);

    /**
     * 批量删除机票预订_机票订单机票明细
     * 
     * @param orderInfoTicketsIds 需要删除的数据ID
     * @return 结果
     */
    public int deleteFlightOrderInfoTicketsByIds(Long[] orderInfoTicketsIds);

    /**
     * 我的-订单列表（机票-明细）
     * */
    public List<FlightOrderInfoTickets> selectFlightOrderInfoTicketsByCustomerId(Long customerId);

    /**
     * 我的-订单列表（机票-详细信息）
     * */
    public FlightOrderInfoVo selectFlightOrderInfoByOrderId(@Param("orderId") Long orderId,
                                                            @Param("customerId") Long customerId);

    /**
     * 我的-订单列表（机票-基本信息）修改订单(证件号)
     * */
    public int updateFlightOrderInfoTicketsByFlightOrderInfoVo(FlightOrderInfoVo flightOrderInfoVo);

    /**
     * 查看行程用
     * @param orderID
     * @return
     */
    public List<FlightOrderInfoTickets> queryFlightOrderTrip(Long orderID);

    /**
     * 查询订单列表（机票）
     * */
    public List<FlightOrderInfoTickets> checkTheTicketList(Long orderId);

    /**
     * 机票订单详细（远程）
     * */
    public FlightOrderInfoTickets order(String ticketNum);

    /**
     * 根据订单ID获取订单详细信息
     * @param orderId
     * @return
     */
    List<FlightOrderInfoTickets> selectOrderInfoTicketByOrderId(@Param("orderId") Long orderId);

    /**
     * 根据票号获取订单详细信息
     * @param ticketNo
     * @return
     */
    FlightOrderInfoTickets getFlightOrderInfoByTicketNo(String ticketNo);

    public List<FlightOrderInfoTickets> getFlightOrderInfoByTicketNoList(String ticketNo);

    /**
     * 定制行程-单程
     * @param customerId
     * @param guestPymtStsId
     * @return
     */
    public FlightOrderInfoTickets queryInfoTickets(@Param("customerId") Long customerId, @Param("guestPymtStsId") String guestPymtStsId);

    /**
     * 改期
     * @param orderId
     * @return
     */
    public List<FlightOrderInfoTickets> selectRescheduled(Long orderId);

    /**
     * 根据票号与订单号修改机票预订_机票订单机票明细
     *
     * @param flightOrderInfoTickets 机票预订_机票订单机票明细
     * @return 结果
     */
    public int updateFlightOrderInfoTicket(FlightOrderInfoTickets flightOrderInfoTickets);

    /**
     * 机票分析（未使用）
     * @param customerId
     * @param startDate
     * @param endDate
     * @return
     */
    public List<FlightOrderInfoTickets> flightAnalysis(@Param("customerId") Long customerId, @Param("startDate") String startDate, @Param("endDate") String endDate);

    /**
     * 机票分析
     * @param customerId
     * @param airliner
     * @param cabin
     * @param id
     * @param startDate
     * @param endDate
     * @return
     */
    public List<FlightOrderInfoTickets> analysisFlight(@Param("customerId") Long customerId, @Param("airliner") String airliner, @Param("cabin") String cabin,
                                                       @Param("id") List<Long> id, @Param("startDate") String startDate, @Param("endDate") String endDate);

    /**
     * 行程机票订单
     * */
    public List<FlightOrderInfoTickets> journeyRescheduled(Long orderId);

    /**
     * 回填票号
     * */
    public int backfillTicketNumber(@Param("id") Long id, @Param("ticketNumber") String ticketNumber);

    /**
     * 根据主订单号修改状态
     * @param orderId
     * @param status
     * @return
     */
    public int updateFlightOrderInfoTicketsByOrderId(@Param("orderId") Long orderId, @Param("status") String status);
}
